<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .container{
            width: 800px;
            height: 800px;
            border: 5px solid #786;
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            /* 定义项目在主轴上的对齐方式 */
            /* justify-content: flex-end; */
            /* justify-content: center; */
            /* justify-content: space-between; */
            /* justify-content: space-around; */
            /* justify-content: space-evenly; */
            /* 定义项目在交叉轴上的对齐方式 */
            /* align-items: stretch; */
            /* 以元素内的文字第一行的下划线对齐 */
            /* align-items: baseline; */
            /* 以元素为边界对齐 */
            /* align-items: flex-start; */
            /* align-items: flex-end; */
            /* align-items: center; */
            /* 决定主轴在交叉轴方向上的分布方式 */
            /* align-content: stretch; */
            /* 两主轴并列贴上/下边 */
            /* align-content: flex-start; */
            /* align-content: flex-end; */
            /* align-content: center; */
            align-content: space-around;
            /* align-content: space-between; */
            /* align-content: space-evenly; */

        }
        .box{
            width: 200px;
            height: 200px;
        }
        #div1{
            background: red;
        }
        #div2{
            background: orange;
        }
        #div3{
            background: yellow;
        }
        #div4{
            background: green;
        }
        #div5{
            background: greenyellow;
        }
        #div6{
            background: blue;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box" id="div1">1</div>
        <div class="box" id="div2">2</div>
        <div class="box" id="div3">3</div>
        <div class="box" id="div4">4</div>
        <div class="box" id="div5">5</div>
        <div class="box" id="div6">6</div>
    </div>
</body>
</html>